-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pipeline] Add option --privileged for running slave docker #1067
Conversation
@jimmyzhai Can that same be done for swss-common? https://github.com/Azure/sonic-swss-common/blob/master/.azure-pipelines/build-sairedis-template.yml |
Yes. |
@jimmyzhai Does it only happen in AZP? Do we need to fix document like https://github.com/Azure/sonic-buildimage/blob/master/README.buildsystem.md? |
The fix #1067 is not enough. If docker user is non-root, set capability CAP_SYS_TIME for settimeofday success in syncd test, then test_watchdog_timer_clock_rollback can be run. Co-authored-by: junhuazhai <junhuazhai@contoso.com>
…s' (#633) Following sonic-net/sonic-sairedis#1067 and sonic-net/sonic-sairedis#1068, it fixes the below failure at `make check` of building syncd in step 'Compile sonic sairedis': ``` Making check in syncd make[2]: Entering directory '/__w/1/s/syncd' make check-TESTS make[3]: Entering directory '/__w/1/s/syncd' tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(¤tTime, NULL) == 0' failed. /bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst FAIL: tests ```
…s' (sonic-net#633) Following sonic-net/sonic-sairedis#1067 and sonic-net/sonic-sairedis#1068, it fixes the below failure at `make check` of building syncd in step 'Compile sonic sairedis': ``` Making check in syncd make[2]: Entering directory '/__w/1/s/syncd' make check-TESTS make[3]: Entering directory '/__w/1/s/syncd' tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(¤tTime, NULL) == 0' failed. /bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst FAIL: tests ```
In azp run, the following failure always happens at the stage of `make check` of building syncd. ``` Making check in syncd make[2]: Entering directory '/__w/1/s/syncd' make check-TESTS make[3]: Entering directory '/__w/1/s/syncd' tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(¤tTime, NULL) == 0' failed. /bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst FAIL: tests ``` The execution of `settimeofday(¤tTime, NULL)` fails in slave docker with errno **EPERM**, because CAP_SYS_TIME capability is dropped in docker. Using option `--privileged` gives docker extended privileges for its success. This failure has existed for a long time in azp build and is not exposed till sonic-net#1050.
…net#1068) The fix sonic-net#1067 is not enough. If docker user is non-root, set capability CAP_SYS_TIME for settimeofday success in syncd test, then test_watchdog_timer_clock_rollback can be run. Co-authored-by: junhuazhai <junhuazhai@contoso.com>
In azp run, the following failure always happens at the stage of
make check
of building syncd.The execution of
settimeofday(¤tTime, NULL)
fails in slave docker with errno EPERM, because CAP_SYS_TIME capability is dropped in docker. Using option--privileged
gives docker extended privileges for its success.This failure has existed for a long time in azp build and is not exposed till #1050.